package com.yanqu.road.server.cmd.activity.peakseacraft;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.PeakSeacraftProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.peakseacraft.PeakSeacraftMgr;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C_PEAK_SEACRAFT_GET_PROMOTION_UNION, desc = "海上争霸 南海丝路 向跨服索要晋级联盟数据")
public class CrossPeakSeacraftGetPromotionUnionCmd extends CrossUnionCommand {

    int activityId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        PeakSeacraftProto.PeakSeacraftGetPromotionUnionGameToCrossMsg gameToCrossMsg = PeakSeacraftProto.PeakSeacraftGetPromotionUnionGameToCrossMsg.parseFrom(packet.getBytes());
        activityId = gameToCrossMsg.getActivityId();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        PeakSeacraftMgr.getPromotionUnion(activityId, serverId, groupId);
    }

    @Override
    public void sendData() {

    }
}
